package com.chuangjiangx.member.basic.ddd.domain.model;


import java.util.Objects;

public enum ClaimStatus {
    UNCLAIM("未取货",0),
    CLAIMED("已取货",1);

    public final String name;
    public final Integer code;

    ClaimStatus(String name,Integer code) {
        this.name = name;
        this.code = code;
    }


    public static ClaimStatus getStatus(Integer code) {
        for (ClaimStatus claimStatus : ClaimStatus.values()) {
            if (Objects.equals(claimStatus.code, code)) {
                return claimStatus;
            }
        }
        return null;
    }
}
